package com.zkingsoft.zkingbase.utils;

import android.text.TextUtils;

/**
 * Created by ytf on 2016/11/15.
 */
public class RegaxUtils
{
    public static final String emailRegax = "^(\\w)+(\\.\\w+)*@\\w+((\\.\\w{2,3}){1,3})$";
    public static final String idCardRegax = "^\\d{15}|^\\d{17}([0-9]|X|x)$";
    public static final String phoneRegax = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";

    public static boolean isPhoneNumber(String pn)
    {
        if(!TextUtils.isEmpty(pn))
        {
            return pn.matches(phoneRegax);
        }
        return false;
    }
}
